package com.ruoyi.admin.domain.vo.response.returnGood;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ruoyi.admin.domain.vo.response.atricle.AtriclePageJoinResponse;
import com.ruoyi.common.page.PageParamResponse;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;

import java.util.ArrayList;
import java.util.List;


/**
 * 退货表分页返回数据实体
 *
 * @author jianhan
 * @date 2023-02-01 13:51:12
 */
@Data
@ToString
@AllArgsConstructor
@NoArgsConstructor
public class ReturnGoodsPageResponse extends PageParamResponse {

    @ApiModelProperty("退货表列表")
    private List<ReturnGoodsJoinResponse> records;

    public ReturnGoodsPageResponse(Page<?> page) {
        records = (List<ReturnGoodsJoinResponse>) page.getRecords();

        this.totalCount = page.getTotal();
        this.pageNum = page.getCurrent();
        this.pageSize = page.getSize();
        this.totalPage = page.getPages();
        this.hasPrevious = page.hasPrevious();
        this.hasNext = page.hasNext();
    }

}
